# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=ndctl
pkgver=63
pkgrel=1
pkgdesc='Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel'
arch=('x86_64')
url="https://github.com/pmem/ndctl"
license=('LGPL')
depends=('json-c' 'kmod' 'libsystemd' 'libutil-linux')
makedepends=('asciidoctor' 'xmlto' 'bash-completion')
source=("$pkgname-$pkgver.tar.gz::https://github.com/pmem/ndctl/archive/v$pkgver.tar.gz")
sha512sums=('cfd6eca367fcbd920481bca3f217bb1b2e52c3ac4ff1213f95d00cf039c68cc6accd46c2118829845a07c163cdd927302d14215ff1b3c1996e48c4646ede7cc9')

build() {
  cd "$srcdir"/$pkgname-$pkgver
  ./autogen.sh
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd "$srcdir"/$pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
